home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr05
/
xnot12a.zip
/
INDENT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-05-20
|
619b
|
43 lines
#include "jam.h"
#include "def.h"
/* Work function to compute indent of an existing line
*/
int indentofline(n, lp)
int n;
LINE *lp;
{
register int nicol, i;
int c;
nicol = 0;
while (n--)
{
nicol = 0;
for (i = 0; i < llength(lp); ++i)
{
c = lgetc(lp, i);
if ((c != ' ') && (c != '\t'))
break;
if (c == '\t')
nicol |= TABROUND;
++nicol;
}
}
return(nicol);
}
/* Sigh, as yet unimplemented code
*/
int indentthisline(lp)
LINE *lp;
{
int foo;
#ifdef INDENTING
foo = indentofline(1, curwp->w_dotp);
#else
foo = 4;
#endif
return (foo);
}